<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en" th:replace="header/header :: header(${title} != null ? ${title} : '发布信息-实体商户社群服务平台',
	'/assets/libs/postedit/honeySwitch.css,
	/assets/module/admin.css,
	/assets/layui/css/layui.css,
	/assets/css/progress.css,
	/assets/css/publish.css,
	/assets/libs/postedit/tagsinput.css',
	'/assets/tinymce/tinymce.min.js,
	/assets/libs/postedit/tag.js,
	/assets/js/prefixfree.min.js,
	/assets/libs/index/app.js?v=21,
	/assets/libs/postedit/myUpdatetinymce.js?v=19')">
</head>
<body class="theme-my" data-theme="theme-my">
<th:block th:if="${resources == null}">
<style>
#root, body, html{
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}
.preview-error {
    font-family: -apple-system,helvetica,sans-serif;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 176px;
}
.preview-error .preview-error-icon {
    width: 100px;
    height: 72px;
    margin-bottom: 4px;
}
.preview-error .preview-error-message {
    font-size: 15px;
    color: #999;
    margin-bottom: 24px;
}
.preview-error .tt-darkmode-preview-error-btn {
    color: #fff;
}
.preview-error .preview-error-btn {
    height: 28px;
    border-radius: 2px;
    background-color: #f04142;
    font-size: 14px;
    line-height: 28px;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
}
</style>
</th:block>
<style>
	.layui-form-select dl {
    	max-height: 110px;
    }
    .publish-message-opr {
    	margin-left: 32px;
    	color: #4e7dd2;
    	cursor: pointer;
	}
	.iziToast > .iziToast-body .iziToast-buttons {
	    margin: -1px 0 0 0;
	}
	.editor-loading {
	    top: 0;
	    left: 0;
	    z-index: 10;
	    background-color: #fff;
	}
	.pagelet-write {
	    min-height: inherit;
	    font-size: 14px;
	    line-height: 1.5;
	    background-color: #fff;
	    padding-bottom: 0;
	    width: 816px;
	    height: 300px;
	}
</style>
<!-- 顶部导航-->
<div th:replace="common/index/indexbar :: indexbar"></div>
<th:block th:if="${resources != null}">
	<!--头条主体-->
	<div class="content">
	    <div class="compNews wrapper contDiaryTop">
	        <div class="postEdit" style="margin-bottom: 100px!important">
	            <div class="main-wrapper">
	            	<input id="mpuserid" th:value="${user.userId}" type="hidden"/>
	                <form class="sidebar-conBody layui-form" lay-filter="resEditForm" id="resEditForm" style="width:1200px;">
	                	<input type="hidden" id="citycodeValue" th:value="${citycode}"/>
	                	<input type="hidden" name="articleId" th:id="${resources.articleId}" th:value="${resources.articleId}"/>
	                	<input type="hidden" id="ttim" th:value="${resources.timingTime}" />
	                    <div class="publish-editor-title publish-editor-title">
	                    	<div class="publish-editor-title-inner">
		                    	<pre class="mock-title" th:text="${resources.title}"></pre>
			                    <div class="editor-title autofit-textarea-wrapper">
			                    	<pre class="autofit-textarea-content"></pre>
				                    <div style="white-space: pre-wrap; overflow-wrap: break-word; position: absolute; visibility: hidden; direction: ltr; box-sizing: border-box; width: 665px; height: 36px; overflow: hidden; border-width: 0px; padding: 0px; font: 700 24px / 36px PingFangSC-Regular, Arial; text-align: start; text-transform: none; text-indent: 0px; text-decoration: none solid rgb(34, 34, 34); letter-spacing: normal; word-spacing: 0px;">
				                    	<span></span>
				                    </div>
				                    <textarea placeholder="请输入文章标题（5-30个字符）" maxlength="30" name="title" autocomplete="off" id="numchange" th:text="${resources.title}"></textarea>
			                    </div>
		                    	<span class="title-tip">还需输入<span class="publish-title-bold">5</span>个字</span>
		                    </div>
	                    </div>
	                    <div class="title-Writing">
	                    	<div class="pagelet-write editor-loading" id="editor-loading"></div>
	                        <!-- 输入文章内容框 -->
	                        <div class="Writing-cont layui-hide">
	                        	<textarea id="editor_id" name="content" style="width:100%;height:550px;resize:none;" th:utext="${resources.content}"></textarea>
	                        </div>
	                    </div>
	                    <div class="moreDiv" id="moreDiv">
	                        <div class="moreDiv-box">
	                            <div class="form-group">
	                                <label class="labTitle" for="">个性标签：</label>
	                                <div class="txt-box">
	                                	 <input type="text" value="" data-role="tagsinput" id="userlabel" class="inputVue" th:value="${resources.tags}">
	                                </div>
	                            </div>
	                           
	                            <th:block th:if="${not #lists.isEmpty(labels)}">
	                            	<div class="form-group">
		                                <label class="labTitle" for=""></label>
		                                <div class="txt-box">
		                                    <ul class="perClassUl">
		                                        <li class="perClassLi" th:each="label:${labels}">
		                                            <a href="javascript:;" class="perClassLi-a" th:attr="data-tit=${label.labelName}" th:text="${label.labelName}"></a>
		                                        </li>
		                                    </ul>
		                                </div>
		                            </div>
	                            </th:block>
	                            
	                            <div class="form-group">
	                                <label class="labTitle" for=""></label>
	                                <div class="txt-box">
	                                    <span class="txt-boxColor">最多添加5个标签，每个标签1-10字符</span>
	                                </div>
	                            </div>
	                            
	                             <div class="form-group">
	                                <label class="labTitle" for="">栏目分类：</label>
	                                <div class="txt-box">
	                                	<input th:each="item, i:${columns}" type="radio" lay-filter="editcolumnFilter" th:attr="data-index=${item.columnId}" name="columnId" th:value="${item.columnId}" th:title="${item.columnName}" th:checked="${item.columnId == resources.columnId}">
	                                </div>
	                            </div>
	                            
	                            <div id="formelem"></div>
	                            
	                            <div class="form-group form-groupTop">
	                                <div class="publish-footer">
	                                	<div class="garr-footer-publish-content publish-footer-content">
	                                		<div class="footer-back-content">发文设置<span class="footer-back-content-icon footer-back-content-icon-down"></span></div>
	                                		<div class="footer-tip"><span class="cumt">正文字数：0</span><span class="footer-tip-save">已保存</span></div>
	                                		<button class="layui-btn layui-btn-primary" th:if="${resources.draft == '1'}" lay-filter="draftEditArticle" style="border-radius: 4px;width: 120px;" lay-submit>存草稿</button>
		                                    <span class="layui-btn layui-btn-primary" th:if="${resources.draft == '1'}" lay-event="timingArticle" style="border-radius: 4px;width: 120px;" lay-submit>定时发布</span>
		                                    <span class="layui-btn layui-btn-primary" th:if="${resources.draft == '3'}" lay-event="timingArticle" style="border-radius: 4px;width: 120px;" lay-submit>修改定时时间</span>
		                                   	<button class="layui-btn" th:if="${resources.draft == '3'}" lay-filter="publishNowEditArticle" style="background-color: #ff4200;border-radius: 4px;width: 120px;" lay-submit>立即发布</button>
		                                    <button class="layui-btn" th:if="${resources.draft != '3'}" lay-filter="publishEditArticle" style="background-color: #ff4200;border-radius: 4px;width: 120px;" lay-submit>发布</button>
	                                	</div>
	                               	</div>
	                            </div>
	                        </div>
	                    </div>
	                </form>
	            </div>
	        </div>
	    </div>
	</div>
</th:block>

<th:block th:if="${resources == null}">
	<div id="root">
		<div class="App">
			<div class="preview-error">
				<img class="preview-error-icon" alt="error-icon" src="/assets/images/error.8dbcb46d.png">
				<div class="preview-error-message">加载失败，请重试</div>
				<div class="tt-darkmode-preview-error-btn preview-error-btn">重试</div>
			</div>
		</div>
	</div>
</th:block>

<script src="/assets/libs/postedit/honeySwitch.js"></script>
<script src="/assets/libs/postedit/tagsinput.min.js"></script>

<!-- 信息类型 -->
<script type="text/html" id="index_1">
<div class="form-group">
	<label class="labTitle" for="">信息类型</label>
	<div class="txt-box">
		<input type="radio" name="articleType" value="0" title="原创" checked>
      	<input type="radio" name="articleType" value="1" title="转载">
      	<input type="radio" name="articleType" value="2" title="翻译">
	</div>
</div>
</script>

<!-- 商铺求租 -->
<script type="text/html" id="index_2">
 <div class="form-group">
	<label class="labTitle layui-form-required" for="">经营业态</label>
  	<div class="txt-box" style="width: 340px;">
   		<select name="formatId" id="formatId" lay-reqText="经营业态不能为空" lay-vertype="tips" lay-verify="required" required>
			<option value="-1">不限</option>
   			<option th:each="item : ${formats}" th:value="${item.formatId}" th:text="${item.formatName}"></option>
   		</select>
   	</div>
</div>
<div class="form-group">
	<label class="labTitle layui-form-required" for="">意向区域</label>
  	<div class="txt-box" style="width: 340px;">
		<input id="cityCodeCascader" th:value="${citycode}" name="cityCode" placeholder="请选择" 
			lay-reqText="意向区域不能为空" lay-vertype="tips" lay-verify="required" required class="layui-hide">
	</div>
</div>
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">面积需求</label>
    <div class="txt-box" style="width: 340px;">
		<select name="area" lay-reqText="请选择面积" lay-vertype="tips" lay-verify="required" required>
        	<option value="">请选择</option>
			<option value="不限">不限</option>
        	<option value="10-20㎡">10-20平米</option>
        	<option value="21-50㎡">21-50平米</option>
        	<option value="51-100㎡">51-100平米</option>
        	<option value="101-150㎡">101-150平米</option>
        	<option value="151-200㎡">151-200平米</option>
			<option value="201-300㎡">201-300平米</option>
			<option value="300-500㎡">300-500平米</option>
			<option value="500㎡以上">500平米以上</option>
      	</select>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">租金预算</label>
   		<div class="txt-box" style="width: 340px;">
			<select name="rent" lay-reqText="请选择租金" lay-vertype="tips" lay-verify="required" required>
        		<option value="">请选择</option>
				<option value="面议">面议</option>
        		<option value="1000-2000元">1000-2000元</option>
        		<option value="2001-4000元">2001-4000元</option>
        		<option value="4001-6000元">4001-6000元</option>
        		<option value="6001-8000元">6001-8000元</option>
        		<option value="8001-10000元">8001-10000元</option>
				<option value="10001-15000元">10001-15000元</option>
				<option value="15001-20000元">15001-20000元</option>
				<option value="20001-30000元">20001-30000元</option>
				<option value="30000元以上">30000元以上</option>
      		</select>
   		</div>
	</div>
</div>
<div class="form-group">
    <label class="labTitle layui-form-required" for="">联系人</label>
    <div class="txt-box" style="width: 340px;">
    	<input type="text" id="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input" maxlength="50"
			lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required" required>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">联系电话</label>
   		<div class="txt-box" style="width: 340px;">
   			<input type="text" id="telephone" name="telephone" placeholder="请输入联系电话" autocomplete="off" class="layui-input"
				lay-reqText="联系电话不能为空" lay-vertype="tips" lay-verify="required|phone" required>
   		</div>
	</div>
</div>
</script>

<!-- 商铺租转-->
<script type="text/html" id="index_3">
<div class="form-group">
	<label class="labTitle layui-form-required" for="">经营业态</label>
  	<div class="txt-box" style="width: 340px;">
   		<select name="formatId" lay-reqText="经营业态不能为空" lay-vertype="tips" lay-verify="required" required>
			<option value="-1">不限</option>
   			<option th:each="item : ${formats}" th:value="${item.formatId}" th:text="${item.formatName}"></option>
   		</select>
   	</div>
	<div style="margin-left:10px;">
		<label class="labTitle" for="">转让费</label>
    	<div class="txt-box" style="width: 340px;">
    		<input type="text" name="transferFee" placeholder="请输入转让费" autocomplete="off" class="layui-input" maxlength="20">
    	</div>
	</div>
</div>
<div class="form-group">
	<label class="labTitle layui-form-required" for="">区域</label>
  	<div class="txt-box" style="width: 340px;">
		<input id="cityCodeCascader" th:value="${citycode}" name="cityCode" placeholder="请选择" class="layui-hide"
			lay-reqText="意向区域不能为空" lay-vertype="tips" lay-verify="required" required>
	</div>
	<div id="index_address" style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">详细地址</label>
		<div class="txt-box" style="width: 340px;">
	     	<input type="text" id="address" name="address" placeholder="请输入详细地址" autocomplete="off" class="layui-input" maxlength="200"
				lay-reqText="详细地址不能为空" lay-vertype="tips" lay-verify="required" required>
	    </div>
     </div>
</div>
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">面积</label>
    <div class="txt-box" style="width: 340px;">
		<select name="area" lay-reqText="请选择面积" lay-vertype="tips" lay-verify="required" required>
        	<option value="">请选择</option>
			<option value="不限">不限</option>
        	<option value="10-20㎡">10-20平米</option>
        	<option value="21-50㎡">21-50平米</option>
        	<option value="51-100㎡">51-100平米</option>
        	<option value="101-150㎡">101-150平米</option>
        	<option value="151-200㎡">151-200平米</option>
			<option value="201-300㎡">201-300平米</option>
			<option value="300-500㎡">300-500平米</option>
			<option value="500㎡以上">500平米以上</option>
      	</select>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">租金</label>
   		<div class="txt-box" style="width: 340px;">
			<select name="rent" lay-reqText="请选择租金" lay-vertype="tips" lay-verify="required" required>
        		<option value="">请选择</option>
				<option value="面议">面议</option>
        		<option value="1000-2000元">1000-2000元</option>
        		<option value="2001-4000元">2001-4000元</option>
        		<option value="4001-6000元">4001-6000元</option>
        		<option value="6001-8000元">6001-8000元</option>
        		<option value="8001-10000元">8001-10000元</option>
				<option value="10001-15000元">10001-15000元</option>
				<option value="15001-20000元">15001-20000元</option>
				<option value="20001-30000元">20001-30000元</option>
				<option value="30000元以上">30000元以上</option>
      		</select>
   		</div>
	</div>
</div>
<div class="form-group">
    <label class="labTitle layui-form-required" for="">联系人</label>
    <div class="txt-box" style="width: 340px;">
    	<input type="text" id="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input" maxlength="50"
			lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required" required>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">联系电话</label>
   		<div class="txt-box" style="width: 340px;">
   			<input type="text" id="telephone" name="telephone" placeholder="请输入联系电话" autocomplete="off" class="layui-input"
				lay-reqText="联系电话不能为空" lay-vertype="tips" lay-verify="required|phone" required>
   		</div>
	</div>
</div>	
</script>

<!-- 商铺出售-->
<script type="text/html" id="index_4">
<div class="form-group">
	<label class="labTitle layui-form-required" for="">经营业态</label>
  	<div class="txt-box" style="width: 340px;">
   		<select name="formatId" id="formatId" lay-reqText="经营业态不能为空" lay-vertype="tips" lay-verify="required" required>
			<option value="-1">不限</option>
   			<option th:each="item : ${formats}" th:value="${item.formatId}" th:text="${item.formatName}"></option>
   		</select>
   	</div>
</div>
<div class="form-group">
	<label class="labTitle layui-form-required" for="">区域</label>
  	<div class="txt-box" style="width: 340px;">
		<input id="cityCodeCascader" th:value="${citycode}" name="cityCode" placeholder="请选择" class="layui-hide"
			lay-reqText="意向区域不能为空" lay-vertype="tips" lay-verify="required" required>
	</div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">详细地址</label>
		<div class="txt-box" style="width: 340px;">
			<input type="text" id="address" name="address" placeholder="请输入详细地址" autocomplete="off" class="layui-input" maxlength="200"
				lay-reqText="详细地址不能为空" lay-vertype="tips" lay-verify="required" required>
		</div>
	</div>
</div>
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">面积</label>
    <div class="txt-box" style="width: 340px;">
		<input type="text" name="area" placeholder="请输入面积" autocomplete="off" class="layui-input" maxlength="20"
				lay-reqText="面积不能为空" lay-vertype="tips" lay-verify="required" required>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">总价</label>
   		<div class="txt-box" style="width: 340px;">
   			<input type="text" id="totalPrice" name="totalPrice" placeholder="请输入出售总价（万）" autocomplete="off" class="layui-input" maxlength="20"
				lay-reqText="总价不能为空" lay-vertype="tips" lay-verify="required|number" required>
   		</div>
	</div>
</div>	
<div class="form-group">
    <label class="labTitle layui-form-required" for="">联系人</label>
    <div class="txt-box" style="width: 340px;">
    	<input type="text" id="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input" maxlength="50"
			lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required" required>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">联系电话</label>
   		<div class="txt-box" style="width: 340px;">
   			<input type="text" id="telephone" name="telephone" placeholder="请输入联系电话" autocomplete="off" class="layui-input"
				lay-reqText="联系电话不能为空" lay-vertype="tips" lay-verify="required|phone" required>
   		</div>
	</div>
</div>
</script>

<!-- 新铺租售 -->
<script type="text/html" id="index_5">
<div class="form-group">
	<label class="labTitle layui-form-required" for="">经营业态</label>
  	<div class="txt-box" style="width: 340px;">
   		<select name="formatId" id="formatId" lay-reqText="经营业态不能为空" lay-vertype="tips" lay-verify="required" required>
			<option value="-1">不限</option>
   			<option th:each="item : ${formats}" th:value="${item.formatId}" th:text="${item.formatName}"></option>
   		</select>
   	</div>
	<div style="margin-left:10px;">
		<label class="labTitle" for="">楼盘名称</label>
    	<div class="txt-box" style="width: 340px;">
    		<input type="text" id="propertyName" name="propertyName" placeholder="请输入楼盘名称" autocomplete="off" class="layui-input" maxlength="50">
    	</div>
	</div>
</div>
<div class="form-group">
	<label class="labTitle layui-form-required" for="">区域</label>
  	<div class="txt-box" style="width: 340px;">
		<input id="cityCodeCascader" th:value="${citycode}" name="cityCode" placeholder="请选择" class="layui-hide"
			lay-reqText="意向区域不能为空" lay-vertype="tips" lay-verify="required" required>
	</div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">详细地址</label>
		<div class="txt-box" style="width: 340px;">
			<input type="text" id="address" name="address" placeholder="请输入详细地址" autocomplete="off" class="layui-input" maxlength="200"
				lay-reqText="详细地址不能为空" lay-vertype="tips" lay-verify="required" required>
		</div>
	</div>
</div>
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">面积</label>
    <div class="txt-box" style="width: 340px;">
		<select name="area" lay-reqText="请选择面积" lay-vertype="tips" lay-verify="required" required>
        	<option value="">请选择</option>
			<option value="不限">不限</option>
        	<option value="10-20㎡">10-20平米</option>
        	<option value="21-50㎡">21-50平米</option>
        	<option value="51-100㎡">51-100平米</option>
        	<option value="101-150㎡">101-150平米</option>
        	<option value="151-200㎡">151-200平米</option>
			<option value="201-300㎡">201-300平米</option>
			<option value="300-500㎡">300-500平米</option>
			<option value="500㎡以上">500平米以上</option>
      	</select>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle" for="">租金</label>
   		<div class="txt-box" style="width: 340px;">
			<select name="rent">
        		<option value="">请选择</option>
				<option value="面议">面议</option>
        		<option value="1000-2000元">1000-2000元</option>
        		<option value="2001-4000元">2001-4000元</option>
        		<option value="4001-6000元">4001-6000元</option>
        		<option value="6001-8000元">6001-8000元</option>
        		<option value="8001-10000元">8001-10000元</option>
				<option value="10001-15000元">10001-15000元</option>
				<option value="15001-20000元">15001-20000元</option>
				<option value="20001-30000元">20001-30000元</option>
				<option value="30000元以上">30000元以上</option>
      		</select>
   		</div>
	</div>
</div>
<div class="form-group">
	<label class="labTitle" for="">总价</label>
   	<div class="txt-box" style="width: 340px;">
   		<input type="text" id="totalPrice" name="totalPrice" placeholder="请输入出售总价（万）" autocomplete="off" class="layui-input" maxlength="20">
   	</div>
</div>	
<div class="form-group">
    <label class="labTitle layui-form-required" for="">联系人</label>
    <div class="txt-box" style="width: 340px;">
    	<input type="text" id="contacts" name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input" maxlength="50"
			lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required" required>
   	</div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">联系电话</label>
   		<div class="txt-box" style="width: 340px;">
   			<input type="text" id="telephone" name="telephone" placeholder="请输入联系电话" autocomplete="off" class="layui-input"
				lay-reqText="联系电话不能为空" lay-vertype="tips" lay-verify="required|phone" required>
   		</div>
	</div>
</div>
</script>

<!-- 商家服务 -->
<script type="text/html" id="index_6">
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">区域</label>
  	<div class="txt-box" style="width: 340px;">
		<input id="cityCodeCascader" th:value="${citycode}" name="cityCode" placeholder="请选择" class="layui-hide"
			lay-reqText="意向区域不能为空" lay-vertype="tips" lay-verify="required" required>
	</div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">服务类型</label>
   		<div class="txt-box" style="width: 340px;">
    		<select name="serviceItems" lay-reqText="服务类型不能为空" lay-vertype="tips" lay-verify="required" required>
        		<option th:each="item:${serviceItems}" th:value="${item.sid}" th:text="${item.name}"></option>
        	</select>
    	</div>
	</div>
</div>	
<div class="form-group">
    <label class="labTitle layui-form-required" for="">联系人</label>
    <div class="txt-box" style="width: 340px;">
    	<input type="text" id="contacts"  name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input" maxlength="50"
			lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required" required>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">联系电话</label>
   		<div class="txt-box" style="width: 340px;">
   			<input type="text" id="telephone" name="telephone" placeholder="请输入联系电话" autocomplete="off" class="layui-input"
				lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required|phone" required>
   		</div>
	</div>
</div>	
</script>

<!-- 商户地摊 -->
<script type="text/html" id="index_7">
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">区域</label>
  	<div class="txt-box" style="width: 340px;">
		<input id="cityCodeCascader" th:value="${citycode}" name="cityCode" placeholder="请选择" class="layui-hide"
			lay-reqText="意向区域不能为空" lay-vertype="tips" lay-verify="required" required>
	</div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">活动类型</label>
   		<div class="txt-box" style="width: 340px;">
    		<select name="formatId" lay-reqText="活动类型不能为空" lay-vertype="tips" lay-verify="required" required>
        		<option value="-1">不限</option>
   				<option th:each="item : ${formats}" th:value="${item.formatId}" th:text="${item.formatName}"></option>
        	</select>
    	</div>
	</div>
</div>	
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">门店地址</label>
  	<div class="txt-box" style="width: 340px;">
		<input type="text" id="address" name="address" placeholder="请输入门店地址" autocomplete="off" class="layui-input" maxlength="200"
				lay-reqText="门店地址不能为空" lay-vertype="tips" lay-verify="required" required>
	</div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">活动时间</label>
   		<div class="txt-box" style="width: 340px;">
    		<input type="text" id="rangTime" name="rangTime" placeholder="开始时间 - 结束时间" autocomplete="off" class="layui-input" maxlength="30"
				lay-reqText="活动时间不能为空" lay-vertype="tips" lay-verify="required" required>
    	</div>
	</div>
</div>
<div class="form-group">
 	<label class="labTitle layui-form-required" for="">活动数量</label>
  	<div class="txt-box" style="width: 340px;">
		<input type="text" name="shopNum" placeholder="请输入活动数量" autocomplete="off" class="layui-input" maxlength="50"
				lay-reqText="活动数量不能为空" lay-vertype="tips" lay-verify="required" required>
	</div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">取货方式</label>
   		<div class="txt-box" style="width: 340px;">
   			<select name="pickUp" lay-reqText="取货方式不能为空" lay-vertype="tips" lay-verify="required" required>
        		<option value="到店自取">到店自取</option>
				<option value="快递邮寄">快递邮寄</option>
      		</select>
    	</div>
	</div>
</div>
<div class="form-group">
    <label class="labTitle layui-form-required" for="">联系人</label>
    <div class="txt-box" style="width: 340px;">
    	<input type="text" id="contacts"  name="contacts" placeholder="请输入联系人" autocomplete="off" class="layui-input" maxlength="50"
			lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required" required>
    </div>
	<div style="margin-left:10px;">
		<label class="labTitle layui-form-required" for="">联系电话</label>
   		<div class="txt-box" style="width: 340px;">
   			<input type="text" id="telephone" name="telephone" placeholder="请输入联系电话" autocomplete="off" class="layui-input"
				lay-reqText="联系人不能为空" lay-vertype="tips" lay-verify="required|phone" required>
   		</div>
	</div>
</div>	
</script>

<!-- 定时发布 -->
<script type="text/html" id="timingTimeId">
    <form id="timingEditForm" lay-filter="timingEditForm" class="layui-form" style="padding: 25px 0 0 0;">
    	<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label" style="width:140px;">请选择发布时间</label>
	                 	<div class="layui-input-inline">
					<select name="date" id="dateId" lay-filter="datefilter"></select>
	           	</div>
	        </div>
	        <div class="layui-inline">
				<div class="layui-input-inline" style="width:60px;">
	                <select id="hourId" name="hour" lay-filter="hourfilter"></select>
				</div>
				<div class="layui-form-mid layui-word-aux">时</div>
	        </div>
			<div class="layui-inline">
				<div class="layui-input-inline" style="width:60px;">
	            	<select id="minuteId" name="minute" lay-filter="minutefilter"></select>
				</div>
				<div class="layui-form-mid layui-word-aux">分</div>
	    	</div>
		</div>
		<div style="text-align:center;padding:30px 0px 40px 0px;">
			<p style="margin-bottom: 24px;">(只能选择2小时-7天范围内的时间)</p>
			<p style="margin-bottom: 24px;">本文将于 <span id="timingId"></span>发布</p>
		</div>
        <div class="layui-form-item text-center" style="border-top: 1px solid #e8e8e8;padding: 10px;">
        	<button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
            <button class="layui-btn" lay-filter="timingPublishSubmit" lay-submit>定时发布</button>
        </div>
    </form>
</script>

<script th:inline="javascript">
layui.use(['form', 'cascader', 'ax', 'laydate'], function () {
	var form = layui.form;
	var cascader = layui.cascader;
	var $ax = layui.ax;
	var laydate = layui.laydate;
	
    var resources = [[${resources}]];
    
    if([[${resources}]] != null){
    	var title = resources.title;
    	var fizeNum = title.length;//获取输入字数
	    var maxlength = 30;
	    var chars = title;
	    if (fizeNum > maxlength) {//如果大于maxlength
	        chars = chars.substr(0, maxlength);//截取字符串（前maxlength）
	        $('#numchange').val(chars);
	        fizeNum = maxlength;
	    }
	    $('.autofit-textarea-content').text(chars);
	    if(fizeNum < 5){
	    	$('.title-tip').html('还需输入<span class="publish-title-bold">'+ (5 - fizeNum) +'</span>个字');
	    }else{
	    	$('.title-tip').html(fizeNum + '/' + maxlength);
	    }
    	
    	delete resources['articleId'];
    	var cascaderData = [];
    	    
   	    var cascaderins = {};
   	    
   	    function cascaderRender(){
   	    	if($("#cityCodeCascader").length > 0){
   	    		cascaderins = cascader.render({
   	            	elem: '#cityCodeCascader',
   	            	filterable: true, // 搜索功能
   	            	notFoundText: '没有匹配到数据',
   	            	itemHeight: '200px',
   	            	reqData: function (values, callback, data) {
   	            		if(cascaderData.length > 0){
   	            			callback(cascaderData);
   	            		}else{
   	            			var ajax = new $ax('/api/city/getDatAll', 'get', function (res) {
   	            				cascaderData = res.data;
   	                            callback(res.data); 
   	                	    }, function (res) {
   	                	    	mynotice.error(res.msg);
   	                	    });
   	                	    ajax.start();
   	            		}
   	                }
   	            })
   	    	}
   	    }
   	    $('#formelem').html($('#index_' + resources.columnId).html());
   	    cascaderRender();
   	    resources.formatId = resources.formatId ? resources.formatId : -1;
   	    form.val('resEditForm', resources);
   	    
   	    /*监听文章分类*/
   	    form.on('radio(editcolumnFilter)', function(data){
   	    	var v = $(data.elem).data('index');
   	    	$('#formelem').html($('#index_' + v).html());
   	    	laydate.render({ 
   	  		  elem: '#rangTime', 
   	  		  range: true
   	  		});
   	    	cascaderRender();
   	    	var formres = {};
   	    	formres['area'] = resources.area; // 面积
   	    	formres['rent'] = resources.rent; // 租金
   	    	formres['totalPrice'] = resources.totalPrice; // 总价
   	    	formres['telephone'] = resources.telephone; // 联系电话
   	    	formres['contacts'] = resources.contacts; // 联系人
   	    	formres['transferFee'] = resources.transferFee; // 转让费
   	    	formres['address'] = resources.address; // 详细地址
   	    	formres['propertyName'] = resources.propertyName; // 楼盘名称
   	    	formres['serviceItems'] = resources.serviceItems; // 服务项目
   	    	formres['formatId'] = resources.formatId ? resources.formatId : -1; // 类型
   	    	formres['serviceItems'] = resources.serviceItems; // 服务项目
   	    	formres['rangTime'] = resources.serviceItems; // 活动时间
   	    	formres['pickUp'] = resources.serviceItems; // 取货方式
   	    	formres['shopNum'] = resources.serviceItems; // 活动数量
   	    	form.val('resEditForm', formres);
   	    	form.render();
   		});
    }else{
    	 $('.tt-darkmode-preview-error-btn').on('click', function(){
         	$('.preview-error').empty();
         	window.location.reload();
         })
    }
    
    $('.footer-back-content').on('click', function() {
        $('html,body').animate({
            scrollTop: $(window).scrollTop() >= 300 ? 0 : $('#moreDiv').offset().top
        }, 800);
    });
    
})
</script>
</body>
</html>